

import request from '../utils/request'

export const pageQueryEmp = (formValue, page, pageSize) =>
    request.get(`/emps?name=${formValue.name}&gender=${formValue.gender}&begin=${formValue.begin}&end=${formValue.end}&page=${page}&pageSize=${pageSize}`);

export const addEmp = (data) => request.post("/emps", data);

export const getEmpById = (id) => request.get(`/emps/${id}`);  //根据id查询员工的请求函数

export const updateEmpById = (emp) => request.put("/emps", emp); //修改员工

export const deleteEmpById = (id) => request.delete(`/emps?ids=` + id); //根据员工id批量删除员工